package com.bootdo.acitvity.DDD.application.controller;

import com.bootdo.acitvity.DDD.application.controller.dto.StockAdjustmentDto;
import com.bootdo.acitvity.DDD.interences.StockAdjustmentService;
import com.bootdo.acitvity.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@RestController
@RequestMapping("/stock/adjustment")
@Slf4j
public class StockAdjustmentController {

    @Autowired
    private StockAdjustmentService stockAdjustmentService;


    /**
     * @Author: 01406379
     * @Description:  增加库存
     * @Date: 2021/7/27 10:29
     */
    @PostMapping ("add")
    public R add(@RequestBody @Valid StockAdjustmentDto stockDto) {
        return R.ok(stockAdjustmentService.add(stockDto));
    }

}
